
// 根据数据把所有的信息丢到页面上去吧

var linkTemplate = '<div class="item"><a href="web_url" target="_blank"><img src="head_img" onerror="this.src=\'images/nick.jpg\'"><span>web_name</span></a></div>';
var itemsElement = document.getElementById("items");

document.body.onload = function() {

    for(var i in links_list) {
        var o = links_list[i];
        var tempBox = linkTemplate.slice(0, linkTemplate.length);
        tempBox = tempBox.replace("web_url", o["url"]);
        tempBox = tempBox.replace("head_img", o["img"]);
        tempBox = tempBox.replace("web_name", o["title"]);

        itemsElement.innerHTML += tempBox;
    }
    
}
